<template>
  <div>
    <div style="width:500px">
        <el-descriptions style="margin-top:50px" :column="1" :labelStyle="{'margin-top':'20px', 'margin-left':'20px', 'font-weight':'bolder'}" 
        :contentStyle="{'margin-top':'20px'}">
            <el-descriptions-item label="余额"><el-tag size="medium">{{this.userInfo.money}}￥</el-tag></el-descriptions-item>
        </el-descriptions>
    </div>
      
  </div>
</template>

<script>
export default {
  inject: ['reload'],
  data(){
    return{
      userInfo: {
        roleId: null,
        username: '',
        gender: '',
        phoneNumber: "",
        money:null,
        address: ''
      },
    }
  },
  beforeCreate(){
    var token = localStorage.getItem("loginToken")
    this.$axios.get('/user/getUserInfo',{headers:{"token": token}})
    .then(res => {
      console.log(res)
      if(res.data.data != null){
        this.userInfo = res.data.data
      }
      // console.log(res)
    })
    .catch(err => {
      // console.error(err); 
    })
  },
  methods: {
    
  }
}
</script>

<style>

</style>
